package com.softeem.main;

import com.softeem.entity.StaffExample;
import com.softeem.entity.WorkOrderExample;
import com.softeem.mapper.InfoMapper;
import com.softeem.mapper.StaffMapper;
import com.softeem.mapper.WorkOrderMapper;
import com.softeem.model.ParamModel;
import com.softeem.service.WorkOrderService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.lang.reflect.Array;
import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
//        WorkOrderMapper workOrderMapper = context.getBean(WorkOrderMapper.class);
//
//        WorkOrderExample example = new WorkOrderExample();
//        workOrderMapper.selectModelsByExampleLimit(example,0,3).forEach(System.out::println);
//        WorkOrderService workOrderService = context.getBean(WorkOrderService.class);
//        ParamModel paramModel = new ParamModel();
////        paramModel.setUserId(Arrays.asList(1,2));
//        paramModel.setTitle("今天");
//        workOrderService.getOrdersDynamical(paramModel).getData().forEach(System.out::println);
//        StaffMapper mapper = context.getBean(StaffMapper.class);
//        StaffExample example = new StaffExample();
//        example.createCriteria().andPasswordEqualTo("1111");
//        StaffExample.Criteria or = example.or();
//        or.andLoginNameEqualTo("111");
//        or.andPhoneEqualTo("111");
//        System.out.println(mapper.selectByExample(example));
        System.out.println("test git");
        System.out.println("test git");
     }
}

